package com.yunqiao.service.api.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 登录表单
 *
 * @author Mark wangxw725@163.com
 * @since 3.1.0 2018-01-25
 */
@ApiModel(value = "登录表单")
@Data
public class LoginForm {

    @ApiModelProperty(value = "角色类型:1货主2司机", required = true, allowableValues = "1,2")
    @Min(1)
    @Max(2)
    @NotNull
    private Integer roleType;

    @ApiModelProperty(value = "账号",required = true)
    @NotBlank(message="账号不能为空")
    private String account;


    @ApiModelProperty(value = "密码",required = true)
    @NotBlank(message="密码不能为空")
    private String password;

    @ApiModelProperty(value = "登陆类型:1 密码-2 验证码",required = true,allowableValues = "1,2")
    @NotNull
    private int type;

    /**
     * 验证码
     */
    @ApiModelProperty("验证码")
    private String smsCode;

}
